/*
package com.example.app.sys.controller;

import com.alibaba.excel.util.DateUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.app.sys.data.comm.ApiResult;
import com.example.app.sys.data.entity.CharacterInfo;
import com.example.app.sys.data.excel.CharacterInfoExcel;
import com.example.app.sys.data.form.CharacterForm;
import com.example.app.sys.service.CharacterInfoService;
import com.example.app.sys.utils.ExcelUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

*/
/**
 * 汉字文学controller 层
 *//*

@RestController
@RequestMapping("chineseCharacter")
public class ChineseCharacterController {
    @Autowired
    private CharacterInfoService service;


    @PostMapping("pageList")
    public ApiResult<Page<CharacterInfo>> pageList(@RequestBody CharacterForm form) {
        Page<CharacterInfo> pageList = service.pageList(form);
        return ApiResult.of(pageList);
    }

    @GetMapping("hello")
    public String hello(HttpServletResponse response, CharacterForm form) {
        List<CharacterInfo> list = service.list();
        try {
            return "ok";
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    @GetMapping("export")
    public void export(HttpServletResponse response, CharacterForm form) {
        List<CharacterInfo> list = service.list();
        try {
            String dateStr = DateUtils.format(new Date(), DateUtils.DATE_FORMAT_14);
            ExcelUtil.download(response, "数据表格_" + dateStr, CharacterInfoExcel.class, list);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    @PostMapping("save")
    public ApiResult<Boolean> save(CharacterInfo characterInfo) {
        boolean save = service.saveInfo(characterInfo);
        return ApiResult.of(save);
    }

    @PostMapping("edit")
    public ApiResult<Boolean> edit(
            CharacterInfo characterInfo) {
        boolean save = service.editInfo(characterInfo);
        return ApiResult.of(save);
    }

    @GetMapping("del/{id}")
    public ApiResult<Boolean> del(@PathVariable Long id) {
        Boolean save = service.delById(id);
        return ApiResult.of(save);
    }
}
*/
